Minor mods for readability and removing unnecessary debug printouts