Added Retry Decorator and efficiency enhancements