Refactoring out completely getNextImages