setup background event listeners and messaging