Refactor to mvc architecture complete