Refactored into objects in javascript

(Model, View, Controller)
![](http://24.media.tumblr.com/9b52dd4937578529e8bba5d34213e6a6/tumblr_ms2z9ramCb1sg01v3o1_500.gif)