Added Rule class and rules