Revert "Revert "merged master into stochastic neuron implementation""

This reverts commit f7115f70b7e2dae2b5e87ea316be952807fee25c.