Patch Set 4: Looks good to me, but someone else must approve; IP review completed

I'm happy with this initial implementation.  Its not optimized, but its rather clear to read and follow, and unit test coverage is quite high.