General purpose utilitites, frequently used functions.