We should lint as well as test
Refactored to make things testable, then added tests