Debugged most of the db class rebuild, still an issue with registration.