Add controller functionality to todos index.jade