Cognitive and communicative factors in language evolution