Added more sophisticated handling of vocabulary lists