minor cleanings and fixes to the pseudocode