more reorganising

the CLI part of spy now only does code compliation and automatic
imports. the fragment chaining stuff is a general, free-standing thing
that the CLI takes advantage of. more or less.