Fixed bugs; removed tests from distribution