Refactor

Closes #7