Script updates and minor fixes