Refactor comments and worker thread script. Add -version argument.