Clean up trailing newlines