Corrected prettyPrint and removed some debug prints