Added hooks for color management
... also there were many other small misc. fixes committed