could be written as `scope.currentLayer = queryParams.bgLayer || backgroundLayers[0].id;`