Moved task ui into a class.