Remove whitespaces and end of the lines