Is `preferences` a Scala or Java preference store? Please change the name according to that. Why moving out `onInit` and `onDispose`? Docu on why they are needed/what they do would be great.