Added comments.
Tried to get the device size right. Didn't work. Sort of worked. Not quite.