Fixes #558
Fixes #697 Switched to golangci-lint, fixes issues with buildkite and does some linting fixes to appease the new linters.