Updated the prepare functions to v2.