Made correction for issue pointed out by Gaetan de Menten. Added snippet for sorting medium sized lists.