Remove spaces from input string