Clean up UI logic