Ran gofmt on the entire codebase and made the code more readable in a few places.