minnor changes to help get background.js use less cpu