refactoring Rule package [in progress]