- Split script into functions