Remove some deprecated API usage