Separates some of the code out to separate scripts