Normalised eof and removed extra whitespace