+ Refactoring of some functions + Added the retrying of all three connections + Added the documentation to the code + Improved the error messages