Final Code and TextFile Outputs