Initialize some variables to avoid warnings
Remove typo'd #ifndef check that's always included
If we erased the last element of the openfiles list, go back to the beginning