Make functions out of each file for local testing