refactored todo model, controller and views, changed complete todo logic