Deleted some unnecessary local variables