Classes for registerRule. Minor fixes.