clean code and added missing output control in GUI, example 3.4
added functionality to show/hide arrows in example 4.4