implemented SoftMax and refactored code
merged conflicts