Added clearing of global struct on terminate.
Merged gamma files into monitor files.