cleanup and add firefox support