Added structural equality test, fixed test failures.