added a bunch of logging. sorted out some of the selection/menu bar stuff. should work more consistently in most cases.