Cleanup in matching code.