Refactored Class.extend method. Now the class name goes first.