Switched to for loops

Removed need to manually check and maintain current client in focus by
utilizing a for loop