Added classes for softmax layer and optimization