Latest work, abandoning this branch.