Adding scripts and minor bug fixes for scripts.