rework the attached entity system using externals