Some cleanups and fixes for Go 1.0