Cleanup up code and UI