Change activityTree format, fixed mongodb field names.