Consolidate utility functions.