Ignore unknown items and remove unneeded new lines