Removed some unused variables here and there