Rearranged and modularised scripts