Added more functions and tests, started with map.