Switched scan tracing to numeric value, added toJSON method, and removed .elt field pointing into DOM