dir: cleanups
all: put low-level internal debug stuff into debug.go