src/background: minor cleanup

* prefers dot notation when possible.
* removes whitespace
* semicolons
Nit: this should change so thtat the bracket is on the same line as the if statement