Added more tests for a number of classes.
Refactored InstanceFactories to a single RegisteringInstanceFactory.