Change Resource Managment from struct to map.