Delete unnecessary code

Removed old helper code for handling opening and closing of files. Seems
completely unnessary to have that in a separate file and only serves to
fragment the code.