Added storage cleanup, user ref and metadata to files.
Added storage cleanup to application startup.