Fix some typehints.
Update API calls.