issue #14 - database bugfixes and tests

by Andy, Michael
issue #14 - get category list

by Michi, Andy