Code now basically working. Docs incomplete.
sync