cleanup tests and simplify RulesMediator base class