Small memory leaks fixing
[Experimental] Preparing for new DrawBG algorithm