Added newline support, need to fix a couple bugs