cleaning up code, remove unused variables.