Push of QIP fixes

Does #19 by adding in a massive amount of fixes by Maddes and Zoid