Fix .gitignore to track scripts; update scripts and fix errors