Various typo fixes and cleaning. Added mode 0 for running from external script
updated build number for changes reference