Fixed typo in server.js and created module and controller and defined functions to handle todos in the core.js