added viewpath definition, integrated more MVC.