A bit of indexer refactoring and a fix for APIS image indexing.
Another tweak for images.