Allow specifying the storage type
refactor away types from classes, more complete example