Bits and bobs of cleanup, moved to forge #624 (you won't even know)