Added pseudocode from text. Still need to fill in variable meanings.