Re-implemented string parsing.