refactoring
refactoring
cleaned solve method
small optims
misc