Clean up handling of task types