ensured MainCtrl does not reload on search
fixed/completed main controller and added todo.js to index scripts