Refactoring to add support for building multiple images at once