Implementation of Instance and Solution classes