Removed all uses of deprecated API.
Removed deprecated API. Definitions are retained on the deprecated branch.