Borrow the MVC logic from TodoMVC project

Specifically from the vanilla JS example:
https://github.com/tastejs/todomvc/blob/gh-pages/vanilla-examples/vanillajs/js/