Added random tests and equality operators.