convert to golang

This converts to golang because it's simpler and more reliable. It will also pave the way for easy addition of more advanced features