Broke out some of the task code into task.coffee. Cleaned some stuff up