Moved 'use strict' into function

I moved the 'use strict' into functions, instead of them being global. I
was getting errors when window.indexedDB was being set when 'use strict'
was being used.