Creating the logic behind converting line-endings.