stable sort implementation

Implement sort algorithm to provide consistent stable sorting across browser implementations #87