Overhauled the code for displaying icons.
Fixes #106
Fixes #105