SED from Cube code

Made a pull request while I work on this in case you have comments.
Ah, this was previously to fix some circular import errors. I resolved the problem but forgot to switch this back. Now done.