Refactored most part of evaluator