Refactoring of view-controllers