Add toggle button support to core, tidying up debug node