Cleaned ExportVariable.

- removed some functions that are not gonna be used any more
- cleaned some code. ExportVariable is not a friend of
  ExportVariableInternal any more.
ExportAlgorithm cleanup
Export of common header in the CGT is more automated now.