Added common methods for working with resizes in storage to a storage interface not to depend on implementation.

Now just implement storage interface to implement your own local or remote file storage strategy.