Conform to PEP 8
Explicitly check for None or the empty string
Fix comments
Use != instead of not ==
Fix notifications

Part of the webkit API was deprecated breaking notifications.
Add shebang