More work on promotion and debug prints
This should have promotion working, I believe. I will need to run more tests.
I have also added additional debug information.