Proper newlines replacement