Stop sorting if less than 2 elements
Sort sub-array after resources freed
Rewrite loops inside the merge function
Add dump() for printing array
Rewrite pivot checking branches