Modified API for wrapping to use prototype and object pair