Made chunk size a bit adaptable to chunk_factor.