simplifed MVC for javascript (mainly meant as a learning project, not for production use)