combined TokenTypes and TokenTypeProvider, pulled up generic code to base classes, simplified generator