Commented code related to D3D9 rendering
Brush allocation partially fixed
Fixes for resource handling (copy, dispose, render)