Moved app.js methods into gtask object.