More documentation (and ui.py)