This draws together patches from a few different threads, deferring the bindings patches until later. Most of these have been reviewed by Jani, with the notable exception of 3/5. There are fair number of small changes in 3/5. They are mostly pretty straight forward, but it wouldn't hurt to have a second pair of eyes on them.