More Map organization, separated writer from map class, moved test code.