Organizational refactoring to try to improve maintainability.
Added unit tests for some of the task-related implementations.