Changed the way QDB is instantiated