Fix problems with unit-tests. Update Image API.
Update main API.