Removing unreferenced defined variables