Implemented insertion sort. Added try catch blocks to main to prevent gaps in the vector.