Added tests for _dist_const()
Fixed piecewise
uncommented stuff
Changes to _dist_const