added matches, small ai cleanup