Simplify the file handling

Still not properly handling files but a little simpler, thankfully.