A collection of useful functions.