mvc refactoring