move backend db class to internal folder