General cleaning and better fit to article notations
Shorter code for color image
Clarify smoothness construction, comments
Various cosmetic changes
Fix upgrade of libpng and jpeg