POC: using context managers to cleanup repeat UI

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
Merge pull request #179 from battlemidget/patch-contextmanager

POC: using context managers to cleanup repeat UI