Improve the firefox and selenium scripts