Cleanup of deprecated and discouraged APIs