Clean code after removing external anonymous script references