update more to use modern palette device handling, removing redundant code (nw)