continuing effort to organize gui code