Move rule handler shim out to own module