Refactor rules into a RulesEngine class, so I can easily test swapping it out with other implementations of the rules