Test cases for P6 and P7.
Fixed problems.
Test cases ready for A3.