refactor: add validator.
refactor: devide controller.
Merge pull request #481 from forumbyr/master

refactor: devide controller.