Cleaned up pseudocode section