add support for multiple databases
fixed group handling, added a few tests
initial prototype checkin