code cleanup, remove unused variables