Clean up UI and code.