Change a lot to supply arbitrary input for cell size.

Signed-off-by: spacewander <spacewanderlzx@gmail.com>