All working code is in ui.py