Refactoring to enhance the phasor model of the analyzer

Refactoring and commenting work in progress