Documentation written, examples provided, code tidied up.