Unable to make commands work through Pie Menu Editor

Hi everyone.
I hope, I selected right tread of the forum.

I was using 2.79 with my custom Pie Menus for a few years, and now try to transfer them to 2.8. I have a few problems here.

  1. I can not make shading mode switch with custom Pie Menu (I use my own). It just does now work and commands even not show in Info window.
  2. I can not make some series of commands in custom Pie Menus to work. For example,
    bpy.ops.mesh.select_linked(delimit=set()); bpy.ops.view3d.view_selected(); bpy.ops.mesh.select_all(action='TOGGLE')
    works fine (selects linked, zooms to it and deselects all) but
    bpy.ops.action.select_linked(); bpy.ops.mesh.remove_doubles(); bpy.ops.action.select_all(action='DESELECT')
    doesn’t work. It even does not removes doubles.

Please help me understand what am I doing wrong.
Thank you!