Moved all rules to a rule registry located in scripts/registry.php
Added Tests for correct working of the instance.php script