Cleanup of unnecessary global variables.
Minor cleanup of global variables.
Removed unused attributes. Moved some public attributes to private section.
Some global variables resolved.
Cleanup of unused global variable. Cleanup of unused externs.