Divide the single script into multiple scripts based on purpose