Still untested. Added example (skeleton), and updated documentation and code.