DRY up the classes

Closes #5