Construct shim class using dependency injection and move shim logic to the shim class