Make init and register return the object