Move helper functions to a single helper-functions script