Refactor mvc