Move utility functions to file.