Move utility functions to a utility file, to allow better sharing...