Refactor parseUnikeyRules