Completed Main, edited string formatting

Main now outputs to a file. Output formatting modified to align columns
Updated comments