refactored and documented Controller and GUIController