removes unused global variables