Did some linting and added a unit test.