Refactoring

Close #20