Fixed issues in the code caused by Git marking differences.
Fixed the bug where output files would not be overwritten.
Simplified output writing
Merge pull request #9 from paulErdos/master

Bug fix, simplification, commenting.