Moved RULES into separate module.