optimization...moved cell size stuff into shared.