more cleanup and gomat stuff