Deleted a lot of unused variables.