Clean up deprecated apis