Debugging code

From Debugging, I've used old code and added things back in.  I'm
probably missing large chunks of code