More refactoring, paring away the Linux-isms from output_image (formerly setup_kernel)