Made some improvements to DBManager.cpp