Replace deprecated functions
Remaining misc helper function test cases