What a mess...but kind of working

header infinite recursion issues fixed, all the right libraries are
included where they should be so the object connections can continue.