Fixes and updates now after the major database structure change.

Signed-off-by: SturmB <sturm359@gmail.com>