Refactored the Encyclopedia API. The complex aggregations are now prefiltered...

Refactored the Encyclopedia API. The complex aggregations are now prefiltered corretly according to the user query and the maximum result set size has been lowered.