Refactored reflection to property. Changed setNumberOfImages to clear content if set to 0.