A useful collection of functions.