Updating images and handling keyboard.