Added more unit tests around the tasks/extensions and re-factored the extensions.