Fix downgrade script/clean up debug statements