added setter for convergenceThreshold and minor code style chances