Miscellaneous routines and utilities.