Converts classes into modules and instance methods into class methods.