To make them more exact, these macros could be done using names instead of UnitID's and get the same effect.

So ...

/cast [target=mouseover,party,nodead] power word: shield; [target=party1,nodead] power word: shield

could be this instead ...

/target xzin
/cast [target=mouseover,party,nodead] power word: shield; [nodead] power word: shield

This way you are sure to cast the spell on xzin no matter what position he is in your party, unless your mouse is over another toon in which case the spell is cast on that toon.