Fixed upcoming exception bug.
Exercise3: resetting values -> now we can restart the algortihm.
Exercise3: Added all phases.