Regarding re-targeting something after clearing your target.
There are a few options you want to look into, and please forgive me if I can't recall what they're called exactly or even where they are.
Two of them are called something to the effect of "auto target on attack" as well as "auto target attacker" which can wreak havoc on you in PvP when scramble sensors is used and you're trying to heal yourself (and not your attacker).
Another option is called something to the effect of "only attack if targeted" which will prevent you from firing your weapons unless you have a target selected.
There are some pros and cons to turning each option off, so fiddle with them until you find the combination that works for you. Also keep this in mind: for all energy based weapons even if you deselect a target it will continue firing until it's firing cycle is over. Thus, if you're an escort and you're trying to time killing a few things at the same time you need to stop firing before the target's damage is 5% or 10% not when it's 1%.