simplify a bit - just try tackling one problem at a time.  and add some more typedefs that maybe should help (still broken though)