small refactor/cleanup
* add params for timeouts etc
* rework connection sharing (only use one connection for all objects)
* formatting