Refactored Insertion sort method. Extracted 3 private methods to simplify readability.