Refactor dbMap