Implemented new createContext API; added console warnings for legacy API calls