Added a few debug statements, removed some uncommented code