The clear action now redirects where you came from

Also fixed some transaction issues around get_task_instances and some cosmetic improvements