Updated to reflect upstream API changes.
Remove deprecated method calls.