Added StructToMap() function.