Got Quern working, it's ugly but works. Refactoring of some other code.