Added opening and closing for map