some refactoring and additional index for faster invalidation; also testing caching word breakdowns
some optimizations