add ability to remove tasks, general code tidy