Improved wording in doc. Renamed variables. Apply several recommendations after review.