complete dbCore module and fix bugs