Refactors Task object
Adds naming support to the function