RenderTarget class and fixes