DRY up background.js, styles