Extract to a class
Add some tests
Version bump