Convert some internal functions to methods.