refactor to use a registry
refactor database structure
finish refactoring new database structure
adjust widgets