Device logic in Application.js