Added server side device detection.