Remove spaces from input