Improve documentation and extract out config values