Some UI changes, fixing memory leaks.