added an Instance type, and changed other classes to its subclasses