Added JSON.stringify for obj serialization