Add loop support to SOACFlorGraph.

Also sort result.