Move extension registration to register() method.