Re-use firefox window instead of creating newone.

Refactor code