Separate out utility functions
Fix for some sites with only one format causing errors