optimize scripts for releasing