Refactored estimator code
Vizualation bug fix