Small modifications to pseudo-code