exit on errors as we cannot pass exception to Qt
dont modify the loaded styles
be less mutative
use destructuring assignment for readability