Cleanup: styling nits
Moved load/unload listeners to chrome files

It looks like the listeneres were not being properly removed and they were
being fired for every window load (prefs window, for instance), which
resulted in undesired errors.