Added file output and tallyresults stuff