...to delete the trails of the beam you don't need to loop in the world to find the beam's trails, why not simply add them to a list and then do a loop in that list?
Not a bad idea, I'll definitely think about it.
Also, about how you create the beams .. you can save the third argument by using dir = o.dir .. instead of a third argument to send the dir variable.
That, however, is a bad idea, since upon creation (using your method) if the "owner" is facing a different direction, then the trail(s) will face that way as well. With a placeholder variable, it will remain constant.
actually my idea is better .. the only problem would be on the following line:
if(T2) new/obj/Beam/tail(T2,Owner,dir)
and it can be fixed, by setting the tail direction equals de head direction. considering the owner variable won't be needed there if you add the tails to a list =D