Moving layer group code to scene