added glossary and fixed allwords extraction