Improved code, added firefox selection spawn.