Altered to work with a ToolBox-based runtime type provider.