Some Fixes of ApproximationAlgorithm + reordering of code