Refactor BaseWrapper to BaseBackend