Made small adjustment to clean up the code slightly and act as a small optimisation.
Added shell sort implementation and associated test.