further refactored frontend to use new db structure