AN: refactored rules manager into a separate class/object.
Summary: fixed a leftover from previous commits.