Added some support functions for maps