Moving OSM code to osmLayer