some api changes, db improvements, bugfixes, small config-style change