headless.distroy and b.close added to fix firefox memory issues