Migration of some deprecated funcions and events API