Fix golint and go vet problems.

Summary: Also minor corrections.

Test Plan: manual. unit tests.

Reviewers: strangemonad, spencerkimball

Reviewed By: spencerkimball

Subscribers: petermattis

Differential Revision: http://phabricator.andybons.com/D40