database: minor bugfixes & mods
CMS: numerous bugfixes