Concerning 1), you can sort your output... you just need an appropriate column to sort by. One approach would be to number your original rows using streamstats count, then to add that field to your stats in the appended pipe with a lower number, ie -1, and to sort by that column. That way you maintain the original ordering and get to put your Totals where ever you like.
Concerning 2), you can in principle do anything you like. For example, I've added a field to the stats named Endpoint with the value "Totals". I'm not sure where you exactly want to add stuff though.
... View more