Refactor destinations.js