Updated dynamic step size to work properly
More work on adaptive step-size