Implements registration.