Adapts to changed storage API, adds initialized event, refactores tests