Reformat line creation to make future changes easier
Improve debugging