Cleanup sample
Fix JsObject writer