Added case for newline character
Checked for two whitespace characters
Made code more general
Pointer stuff, wow... Not sure if I did that right
Wrote a test I thought was applicable, but will only be later