Add prefix rule support
Add tests, change rules to use prefix rules