Clean up the nested switch plugin