Made rule test, some other modifications