Remove unnecessary recursion