Fixed bug in curves for preview mode
Fixed visualization of layer masks
Added desaturate filter
Fixed objects reference counting