Adding graph.rb, some more stuff in sort.rb.