Implemented hand comparison and wrote some tests for it.