Updated duck base class to allow behaviors to be set at runtime.