some clean-up but more needed