fixes #832

Adds an Evaluator class and double-dispatch evaluation of code