Refactoring

divide controller into helper
Refactoring

divide controller into model