privatize #sort_against; minor formatting changes