Clean up JS API