Added order and compare functions.