Remove some nested blocks
Couple of minor improvements in the code
Only try to retrieve bigger icons if the existing sizes is not enough