Optimized entities filtering.
Merge branch 'dev-yannick'