Fixing newline bug, const-correctness.