Refactoring Code so as to support more than arff  InputFormat