More minor refactoring in golang client