Add a logger, fix some golint issues (not all).