Added support for image format; Rewritten Image model to keep devices information as strings instead integers