added ability to clear the rest of a line when doing a newline