Improve performance of the GUI

Seems to be working.