Refactor

Closes  #9