Scratch scripts improvements