Rework onScreen to make it easier to clean up memory leaks