Added autodetection of the device screen size