Update code with refactors.

Improve StorageLink class.
Generalize some data structures.