Fixed indentation
Fixed/updated comments
Refactored init function
Merge branch 'refactor'
Hack for closing popup with second icon button click. Also split most comments/code onto new lines after 80 chars.
Merge branch 'close-on-click'