More work on registration. The database library needs some work.