Reorganization in several files of the gui code.