Code cleanup: reduce global namespace pollution

    - move some initialization code inside functions to reduce the total
      number of temporary global variables

    - the array "findopponent" is not used as a global variable; make it a ::fics variable and not a
      global one