DRY'd up code by creating new replace-map

Made the code a bit more conscise and maintainable.
By the way... good to see you doing stuff with Go! :+1: