establishes MVC framework for javascript