Cleaned the code. Refs #8427.
Merge branch 'feature/8427_filter_weightedevents' into develop