CS - clean up.
CS - added support for more file types, not just jpeg hardcoded.