Performance improvements
Beautify script