refactor(mapById): Move mapById filter into private function
refactor(Resources): Add namespace to resource types
fix(this): Replace this with self in Term Detail