Create utils.h

Minor utility code that needed a home.