Move Type and TypeResolver to appropriate package