Refactored helper scripts to functions.