initialise storage with type and storage object

@nicolashery @jebeck this is more inline with how I think storage should be initialise. Tested and works for both comandline (the original breakage) and the chrome app.