Transformed map obj into constructor.