Remove deprecated functions and add cpp funcs to h