Adding delay between retry attempts, javadoc, small improvements