Move some generic functions out of the monk class.