Revamped sorting

Now sorts each stage individually as required by assignment
added new time files
Add performance doc (still need to add graphs)