Minor tweaks
More DRY
Formatting
Put gear icon into the stylesheets, fix bug on popups