clean up and fix build