Initial implementation of parse string.
Updated code to conform with spec regarding escape characters