Memory optimisation

Stopped the load thread from adding lines with just carriage return,
adding a CR to the beginning of the next line. + stabilisation