Rearranged scripts a bit