Refactor dependency handling for desktop version. Add qmf.