Encapsulate common logic to execute a task
Merge pull request #31 from rstoyanchev/refactor-task

Encapsulate common logic to execute a task