Base code to handle screen, not tested