code cleanup
Handling the migration from the old storage structure to the new one