fixed to_s in ValueNode. Made sure debug output is only printed when $debug evaluates to true.