refactorings, device detection