fixed bad interface design earlier
cleaning up code
class for creating common patterns