Some UI clean up.
Clearing selected items when appropriate.