Minor: Move function to the filw where it belongs.
Fix up the been-visited member