Add some infrastructure to handle screen resizes that don't lose the device