Go 1.1.1 port

Simple changes to port the code Go 1.1.1. Also ran `go fmt`.