Moved rule dictionary creation code over into get-next-gen.