Now removes spaces in the input string.