Fully implemented union merge and scoring of merges.