Fixed some errors that were made during modulation

Now making use of the 'extern' declaration in headers.
Got rid of global variable 'annfile'