SED from Cube code

Made a pull request while I work on this in case you have comments.
Doesn't automatically broadcast as far as I can tell - maybe I need to call some other kind of assert function??