Split the script up into component parts.