Implement comb sort; overall code improvements