Sc fix edge ordering

Hey Shuang, would you take a look ? 

I know the new test has a mildly buggered formatting problem, but i wanted to get it in and i can fix the code formatting when i get it into eclipse.