Fixing template compilation for QPBO to put everything in one file