Changes to the parser

Change the parser to use Text not ByteString, and also to now correctly return the matched string. Also update tests for this