Refine how registerMethod works.