Ql swig r ex2

Pretty straightforward changes -- all examples now work. Not too polished yet, may return to this.