Updated wrap functions and tests.