Getting rid of memory leaks when updating screen.