Resolved issue #4, resolved issue #5, resolved issue #6, resolved issue #7.
Output is mostly fixed other than issue of the sorted numbed being output
a second time and I'm not entirely sure as to why that is.