Refactor merge-sort.js to use self invoking function and strict mode