Moved tasks from server.js to tasks module