Fixes code standard and add configurable chunk value.

Signed-off-by: crynobone <crynobone@gmail.com>