added max_pages settings
added force update of results number after query builder criteria change
minor refactoring