Restructured main loop BC sorting + creating output
Output saved
Merge pull request #2 from md987/master

Creating output + restructuring BC sorting