Updated to deal with new structure.