I appear to have broken some things, so now to debug.
Also, fix some output stuff.