Large refactor, cleans things up on Go side