Added createBaseMap function. Bug fixes