Moved registration into API