comments
refactored some old code to new API loop style
fixed a bug with color transfer function for 1D LUTs