bug 753

Not to be pushed.  Preliminary review, before I do more cleanup and some more changes.