Review code, fix warnings & add gofmt to build script.