Move used strict into functin scope
Switch to $timeout
Cache length in for-loop
Add comma
Add try-catch-block for choosing storage
Add UMD Support