Brought some of the new stuff to the 1.8 branch. Should be broken, haven't tested.