Changing code to conform to new data structures