What started off as fixing a typo in parseString, led to some
refactoring.