Significant performance enhancements.

Removed a lot of the more expensive operations, although at the cost of readability.
Pre-parse type strings at configuration time.