Golint

This expands on #3 and fixes some issues brought up by [golint](https://github.com/golang/lint).