Adding filter() to mapManager.js

Missed that in the first refactor.

Also remove unecessary declaration of "config" variable.