Remove unnecessary newlines