more cleanup and trait work