more DB bugfixes, new method getSites() and getTags()