Correct uses of twolevelselect form field + make badge rule mechanism cleaner and more configurable