Improve retry logic for Stale Element Exceptions

Better exception retry logic

Change methods to lambdas