A few bugfixes in the DocumentFeatures class
Merging code with review.py