Fix get_mapping() so it can work with more than one option

-Reused the commented code on utils
-Pep8 compliant