Perform simplify algorithm refactoring