Remove unused variable and debug print comment.
Fix the recursed ifs case.