Refactor on ShellSort