Better ps sorting and output