Update requirements.txt with new dependencies and refactor activity methods for improved functionality and error handling