added an icon and did some refactoring