Changing deprecated commands in addons and examples

This fixes a lot of warnings during compiling of addons and examples