Updated to reflect API changes.