Refactering the FISTA & IGD Python code