Simple refactor. Closes #6