Adapt two test programs that were using now deprecated functions