cleanup (unused variables, etc)