Fixed typo and optimized scripts