more fixes and clean up