Initialization:

Copied from Dropbox