fix and/or remove unused variables