All analog functions and method moved to class Analog.

Analog algorithms refactoring.