device type detection and some style changes