Added map.cpp and updated generate.