Fix warnings.

Remove deprecated methods.