Cleaned up globals. Added audit script to report on globals, where defined and where used.