Added some file processing code. I need to add a test too!