weka: refactoring and debugging after testing with Test2.