Analog algorithms refactoring.