Add in replace newlines function