Fixed the circular dependency
Still missing a bunch of configuration settings. And the start/end code is not editable yet, and never included.
Experimental, doesn't slice yet, loads of work ahead.