Maps and categories

Maps,categories and FB modules are merged and final comments are added
can't figure out what this function is doing from this comment