Added local parameters to make unsafe code run faster.