Refactor: Less recursion