added ExplainTree and TypeFactory files