Update d7 migrate code to incorporate d6 fixes to class structure and fu...

...nctions