-- Implemented MVC for main and edit pages