better error messages for unmatched token streams
simplify evaluate_step function