Cleanup lingering when.js legacy API usage