Refactoring of class_solver module