more cleanup of code