Move backend-specific code to output/; break out null debug stuff