selects highest ranking player

picks highest ranking player if the given unit is null, added spacing for readability
fixed some local variables
passed units must be players now
variable name fix
comments, spacing
global handles for addactions
Merge pull request #1 from Kieranator/master

fark