Clean up + joining code for chrome and firefox