Heh, it's amazing how similar your sub is to what mine started out as. Put some mileage on yours and see how it performs in heavy spawns, invalid targets, etc, etc. It LOOKS easy at the start... Trust me.
And BTW, tanks are required so that I can release a script and KNOW I don't have to answer constant questions about little corner cases of function. You tend to over-design something when you release it for mass-consumption.