Refactor adapder base.