Amended object factory

Used a dictionary of System.Type and System.Type to store factory
mappings