Added a more convenience testing procedure in main.