Adapted from http://backbonejs.org/examples/todos/index.html Original credit to Jérôme Gravel-Niquet (jgn.me)