MVC based Javascript calculator