Collection of small helper functions.