Script rearranging