Refactor structure close to MVC