Serve file from amazon and performance improvements

Make some performance improvements so functions won't execute
unless they need to

Move the zipped file to amazon with correct cors configuration
to get unzipped in the browser cross origin