refactor MVC pattern & add command class