Bug fixed: task_defined? call is now in a separate class