The icons are in /usr/share/icons. Some icon themes don't have MIME icons and if they have, they are 48x48 or 64x64 (small and ugly). I had some code, which compiled without error, but didn't work. So I came up with another solution. I doubt that a true MIME icon solution would be much faster. I would replace it if it would be needed, but would it be better? More interesting would be to add more MIME types (open sh, py with eg TXPad). I think this should be done somewhere in the system.
@demolition I don't know much about icons, I wouldn't edit icons on device, but I don't like messing with icons anyway