continued effort to organize gui code