Changed uint32mem to int32mem. This removed a lot of floating point arithmetic.