Run gofmt
Check version on init
Reduce code duplication in init
Merge pull request #25 from fd0/minor-improvements

Minor improvements