Update map code and tests added