fixed PuzzleMaker infinite loop bug, removed debug code, and moved some stuff around