Added a Task and Note model. Also simplified some code.