Fixed the memory leaking mentioned in issue #106
But this results in even more screen flickering.
Hope this points us in the right direction!