This is ugly, but finally have a structure that works.