Finish making the extend function API-compatible with BB