Cleanup and jailing of scripts