Remove usage of deprecated functions