made guicontroller static which may have been a mistake, and other improvements