Added mobile detection/template swapping