Reorganizing things into svg groups