Removed some unused variables and deadstores.