Improve documentation and script code.