Implementing sorting algorithms. TODO: heap sorting() tomorrow night