Refactoring FISTA & IGD C++ code