handling output formats for images.
Improved source's  documentation. Added TODOs