Added rule class with basic functionality