Add a task class and adaptor