Removing unnecessary newlines