Miscellaneous functions from the old extension.