Cleanup, lint, fix tests.

Also, use a single 'logger' parameter instead of an injection object.