Very nice write up. There are some libraries like bitcoin-js that do accomplish that task, but they aren't very well documented, so your work is definitely welcome here.
One note - The version byte can have up to four valid values for Bitcoin network:
- 0x00 - main network pubkey hash address
- 0x05 - main network script hash address (e.g. multisig address)
- 0x6F - test network pubkey hash address
- 0xC4 - test network script hash address
More information:
https://en.bitcoin.it/wiki/List_of_address_prefixes