JS API Cleanup