Cleanup and a new method to draw the cache texture for debug purpose