Changes for db handling

Moved DB handlig to QML for now - old JS no longer works  with QT5