Refactoring, housekeeping, initial re-design of data storage