More optimizations and another script