Knocking out more bugs in right extend.  Adding test code.