clean-up and more debug