improved diets parsing and End-of-Line character handling