added clean refs task
Removed unused setting code
Added internal exception dialog