First-pass at a test harness.
Added main functionality.