Tidy up and change Strings to Text

Also added the beginnings of State bases parsing for the API types
Tidy up the code a bit and move away from String

This follows the last commit on Types which replace most of the String
stuff with Text
Add containers to use Set in Types.hs