Make use of OOP wrapper in test.rs and fix some problems. Now it runs.