some fixes, setting up testing "framework"