Added reconnection and documentation