Added logic to handle File output

The program should now store data correctly. To be tested. Also cleaned up
files to prune selected auto-generated comments.