Clean up API JS