EDIT: Edited insertion sort into pointer passing.