First pass of #3 done

Not 100% certain on algorithm yet.  Need to revisit after completing
everything else.