Add chunk-size parameter. Closes #1.