Moved stuff around in preparation of firefox add-on