Removed redrawing logic from the main.py file and instead allowed the UI class to manage it. All elements that need redrawing are redrawn in one go as a batch, rather than each time an element changes (which can lead to as many as 4 redraws a second).