How to register classes and groups