General cleanup and starting to put in monotonically increasing line output