Add register function and register models