remove dead code and speed up match deserialization

Reviewer: @wilmo119