Major refactoring so that chromium and firefox actually share the same
code where possible. Worked had previously commenced on this but this is
now complete. Of course the chrome version is still not working
properly.