don't overwrite duplicate layers
move source mapping into sourcelayers template