Added to stringify method to get a JSON string from the object as well a...

...s a bug fix.