Parsing and mapping strings