Add optimize script.
Perms.