Rearranged GraphicalInterface code..

Rearranged so that like items are grouped together, added more comments
to separate groups of items and related code.