Removed log file, added some retries to the connection creation.
Removed some unused code.