Cleaned up implementation of registrar