Use Date.now() instead of new Date()
Use let instead of var for Firefox
Remove multiple var declarations by moving them to top
Merge pull request #657 from mc10/extension

Use Date.now() and move var statements, var -> let for Firefox