Refactoring

Close #5
Close #3
Close #3
Close #1