Rearrange before scripts