Added two-dimensional end2end test.
Corrected mistakes in end2end test. Removed other (redundant) test.