Algorithms for Convex Optimization