ui: minor performance enhancements
cleaner shutdown sequence

previously all objects were not deleted on shutdown, and valgrind
complained about related memory leaks