Major commit

Refactoring, Validation, Multithread, Softmax.