Updated several sorting algorithms

Cleaned and tweaked em.