Fix filtering bugs in map, table, terms, and histogram modules.
Optimize code by moving functions to filterSrv.
Remove some hard coded.