Move class methods into ClassMethods module for better extensibility.