Remove spaces and unwanted comments