Remove an unused global variable and commented out code