Storage abstraction

Storage abstraction as proposed by @jakobwesthoff in #35. Kept separated from the rest of #35 to evaluate if that's really needed or not.