Schematorial

Schema code rebased on top of latest changes.