An object-oriented optimization framework for large-scale inverse problems. (September 2021)