Improved squema to support multiple groups
Revised file DB support
Other minor DB fixes