Added reflect package, instanceToType method.