Turn the UI into a class, instead of a ragtag collection of functions