Sorted the bindings mess out.
Lots of unit tests.