Move chunking to a library and split out IDLog and Secret Key caching to dedicated classes.