Optimizer is finished! all test cases work. Fixed node deletion from linked list