moving common stuff out of layout, preparation for two files
moving common stuff out of layout, preparation for two files

bhargav175/mapjs,danielrasmuson/mapjs,pyxis777/mapjs,danielrasmuson/mapjs,bhargav175/mapjs,bhargav175/mapjs,ztx1491/mapjs,danielrasmuson/mapjs,pyxis777/mapjs,AbdulMuhsinSE/mapjs,ztx1491/mapjs,AbdulMuhsinSE/mapjs,pyxis777/mapjs,mindmup/mapjs,mindmup/mapjs,ztx1491/mapjs,AbdulMuhsinSE/mapjs,davedf/mapjs,davedf/mapjs