Embed mapping url instead of headers use + code refactoring