Refactor doc polling as new method
Move timeout rescue to poll method
Method to build upload connection
Merge pull request #5 from gini/refactoring

Refactoring