refactor: move mode-decision algorithms into their own algorithm classes