tablet and desktop; code cleanup