Move library loading from DBFactory to DBImpl