Refactor

Closes #28