fixed up factory tests and split out the type and type chain resolving
into a different class