DB query improvements (added tables to HashMaps)