Changed the DataInstance class into two classes.