Code and warning cleanup in rulesystems package.