ProcGUI: refectored main draw() to make it easier to understand