Refactored decision making logic into DecisionMaker class.