Got rid of the variable copying for speed.