Refactored revealCell to not involve infinite recursion